package Sort;

public class Resursiondemo1 {
    //需求：求5的阶乘
    public static void main(String[] args) {
        int sum=getFactorialResursion(5);
        System.out.println(sum);
    }

    private static int getFactorialResursion(int i) {
        if(i==1){
            return 1;
        }
        return i*(getFactorialResursion(i-1));
    }
}
